<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="" />
<meta name="author" content="" />

<title>Buscar imoveis</title>

<link rel="stylesheet"
	href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" />

<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
    <![endif]-->
</head>

<body>
	<!-- Fixed navbar -->


	<!-- /container -->


	<!-- Bootstrap core JavaScript
    ================================================== -->
	<!-- Placed at the end of the document so the pages load faster -->


	<f:view>
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
	<div class="container">
	<!-- Brand and toggle get grouped for better mobile display -->
		<div class="navbar-header">
			<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
				<span class="sr-only">Toggle navigation</span>
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
			</button>
			<a class="navbar-brand" href="/imotech-web/index.html">Imotech</a>
		</div>
	
		<!-- Collect the nav links, forms, and other content for toggling -->
		<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
	
			<ul class="nav navbar-nav">
				<li class="dropdown">
					<a href="#" class="dropdown-toggle" data-toggle="dropdown">Imoveis <b class="caret"></b></a>
					<ul class="dropdown-menu">
						<li><a href="/imotech-web/faces/imoveis/cadastrar.jsp">Cadastrar Imovel</a></li>
						<li><a href="/imotech-web/faces/imoveis/todos.xhtml">Buscar Imovel</a></li>
						<li><a href="/imotech-web/faces/venda/selecionarImovel.xhtml">Vender</a></li>
						<li><a href="/imotech-web/faces/aluguel/selecionarImovel.xhtml">Alugar</a></li>
					</ul>
				</li>
				<li class="dropdown">
					<a href="#" class="dropdown-toggle" data-toggle="dropdown">Administrativo <b class="caret"></b></a>
					<ul class="dropdown-menu">
						<li><a href="/imotech-web/faces/funcionario/cadastrar.jsp">Cadastrar Funcionario</a></li>
						<li><a href="/imotech-web/faces/funcionario/todos.jsp">Listar Funcionarios</a></li>
						<li><a href="/imotech-web/faces/cliente/cadastrar.jsp">Cadastrar Cliente</a></li>
						<li><a href="/imotech-web/faces/cliente/todos.jsp">Listar Clientes</a></li>
					</ul>
				</li>
				<li><a href="/imotech-web/faces/agendamento/cadastrar.jsp">Agendamento</a></li>
				<li><a href="/imotech-web/faces/site/contato.jsp">Entre em Contato</a></li>
			</ul>
		</div><!-- /.navbar-collapse -->
	</div><!-- /.container -->
</nav>

		<div class="container">

			<!-- Main jumbotron for a primary marketing message or call to action -->
			<div class="jumbotron">
				<h1>Imotech</h1>
				<p>Controle sua imobiliária.</p>
			</div>

			<div class="page-header">
				<h4>Busca de imóveis</h4>
			</div>

			<h:form role="form" styleClass="form-horizontal">
				


				<div class="row">
					<div class="col-sm-2">
						<label class="col-sm-1 control-label">Negociação:</label>
					</div>
					
					<div class="col-sm-2">
						<label class="col-sm-1 control-label">Tipo:</label>
					</div>
					
					<div class="col-sm-2">
						<label class="col-sm-1 control-label">Bairro:</label>
					</div>
					
					<div class="col-sm-2">
						<label class="col-sm-1 control-label">Valor:</label>
					</div>
						
					<div class="col-sm-2">
						<label class="col-sm-1 control-label">Quartos:</label>
					</div>
					
					<div class="col-sm-2">
					</div>
				
				</div>

				<div class="row">
				
					<div class="col-sm-2">
						<h:selectOneMenu value="#{busca.negociacao}" styleClass="form-control">
							<f:selectItem itemValue="" itemLabel="Todos" />
   							<f:selectItem itemValue="alugar" itemLabel="Alugar" />
   							<f:selectItem itemValue="temporada" itemLabel="Alugar por Temporada" />
   							<f:selectItem itemValue="compraVenda" itemLabel="Compra/Venda" />
						</h:selectOneMenu>
					</div>
					
					<div class="col-sm-2">
						<h:selectOneMenu value="#{busca.tipo}" styleClass="form-control">
							<f:selectItem itemValue="" itemLabel="Todos" />
   							<f:selectItem itemValue="casa" itemLabel="Casa" />
   							<f:selectItem itemValue="apartamento" itemLabel="Apartamento" />
   							<f:selectItem itemValue="terreno" itemLabel="Terreno" />
   							<f:selectItem itemValue="kitnet" itemLabel="Kitnet" />
						</h:selectOneMenu>
					</div>
					
					<div class="col-sm-2">
						<h:selectOneMenu value="#{busca.bairro}" styleClass="form-control">
								<f:selectItem itemValue="" itemLabel="Todos" />
								<f:selectItem itemValue="Alecrim" itemLabel="Alecrim" />
								<f:selectItem itemValue="Areia Preta" itemLabel="Areia Preta" />
								<f:selectItem itemValue="Bairro Nordeste" itemLabel="Bairro Nordeste" />
								<f:selectItem itemValue="Barro Vermelho" itemLabel="Barro Vermelho" />
								<f:selectItem itemValue="Bom Pastor" itemLabel="Bom Pastor" />
								<f:selectItem itemValue="Candelaria" itemLabel="Candelaria" />
								<f:selectItem itemValue="Capim Macio" itemLabel="Capim Macio" />
								<f:selectItem itemValue="Cidade Alta" itemLabel="Cidade Alta" />
								<f:selectItem itemValue="Cidade da Esperanca" itemLabel="Cidade da Esperanca" />
								<f:selectItem itemValue="Cidade Nova" itemLabel="Cidade Nova" />
								<f:selectItem itemValue="Cidade Satelite" itemLabel="Cidade Satelite" />
								<f:selectItem itemValue="Cidade Verde" itemLabel="Cidade Verde" />
								<f:selectItem itemValue="Dix-sept Rosado" itemLabel="Dix-sept Rosado" />
								<f:selectItem itemValue="Felipe Camarao" itemLabel="Felipe Camarao" />
								<f:selectItem itemValue="Guarapes" itemLabel="Guarapes" />
								<f:selectItem itemValue="Igapo" itemLabel="Igapo" />
								<f:selectItem itemValue="Lagoa Azul" itemLabel="Lagoa Azul" />
								<f:selectItem itemValue="Lagoa Nova" itemLabel="Lagoa Nova" />
								<f:selectItem itemValue="Lagoa Seca" itemLabel="Lagoa Seca" />
								<f:selectItem itemValue="Mae Luiza" itemLabel="Mae Luiza" />
								<f:selectItem itemValue="Mirassol" itemLabel="Mirassol" />
								<f:selectItem itemValue="Morro Branco" itemLabel="Morro Branco" />
								<f:selectItem itemValue="Nossa Senhora da Apresentacao" itemLabel="Nossa Senhora da Apresentacao" />
								<f:selectItem itemValue="Nazare" itemLabel="Nazare" />
								<f:selectItem itemValue="Nova Cidade" itemLabel="Nova Cidade" />
								<f:selectItem itemValue="Nova Descoberta" itemLabel="Nova Descoberta" />
								<f:selectItem itemValue="Nova Natal" itemLabel="Nova Natal" />
								<f:selectItem itemValue="Nova Parnamirim" itemLabel="Nova Parnamirim" />
								<f:selectItem itemValue="Pajucara" itemLabel="Pajucara" />
								<f:selectItem itemValue="Parque das Colinas" itemLabel="Parque das Colinas" />
								<f:selectItem itemValue="Petropolis" itemLabel="Petropolis" />
								<f:selectItem itemValue="Pirangi" itemLabel="Pirangi" />
								<f:selectItem itemValue="Pitimbu" itemLabel="Pitimbu" />
								<f:selectItem itemValue="Planalto" itemLabel="Planalto" />
								<f:selectItem itemValue="Ponta Negra" itemLabel="Ponta Negra" />
								<f:selectItem itemValue="Potengi" itemLabel="Potengi" />
								<f:selectItem itemValue="Potilandia" itemLabel="Potilandia" />
								<f:selectItem itemValue="Parque das Dunas" itemLabel="Parque das Dunas" />
								<f:selectItem itemValue="Praia do Meio" itemLabel="Praia do Meio" />
								<f:selectItem itemValue="Quintas" itemLabel="Quintas" />
								<f:selectItem itemValue="Redinha" itemLabel="Redinha" />
								<f:selectItem itemValue="Ribeira" itemLabel="Ribeira" />
								<f:selectItem itemValue="Rocas" itemLabel="Rocas" />
								<f:selectItem itemValue="San Vale" itemLabel="San Vale" />
								<f:selectItem itemValue="Santarem" itemLabel="Santarem" />
								<f:selectItem itemValue="Santos Reis" itemLabel="Santos Reis" />
								<f:selectItem itemValue="Serrambi" itemLabel="Serrambi" />
	   							<f:selectItem itemValue="Tirol" itemLabel="Tirol" />
	   							
	   						</h:selectOneMenu>
					</div>
					
					<div class="col-sm-2">
						<h:inputText value="#{busca.valorMinimo}" styleClass="form-control"><f:convertNumber></f:convertNumber></h:inputText>
					</div>
					
					<div class="col-sm-2">
						<h:inputText value="#{busca.quartosMinimo}" styleClass="form-control"><f:convertNumber></f:convertNumber></h:inputText> 
					</div>
					
					<div class="col-sm-2">
						<h:commandButton value="Buscar" styleClass="btn btn-primary"></h:commandButton>
					</div>
				</div>
				
				
				<div class="row">
				
					<div class="col-sm-2">
					</div>
					
					<div class="col-sm-2">
					</div>
					
					<div class="col-sm-2">
					</div>
					
					<div class="col-sm-2">
						até
					</div>
					
					<div class="col-sm-2">
						até
					</div>
					
					<div class="col-sm-2">
					</div>
				</div>
				
				<div class="row">
				
					<div class="col-sm-2">
					</div>
					
					<div class="col-sm-2">
					</div>
					
					<div class="col-sm-2">
					</div>
					
					<div class="col-sm-2">
						<h:inputText value="#{busca.valorMaximo}" styleClass="form-control"><f:convertNumber></f:convertNumber></h:inputText>
					</div>
					
					<div class="col-sm-2">
						<h:inputText value="#{busca.quartosMaximo}" styleClass="form-control"><f:convertNumber></f:convertNumber></h:inputText>
					</div>
					
					<div class="col-sm-2">
					</div>
				</div>







				<div class="page-header">
					<h3>Imóveis encontrados</h3>
				</div>

				<table class="table table-stripped">
					<thead>
						<tr>
							<th>Imóvel</th>
							<th>Descrição</th>
							<th>Preço</th>
							<th></th>
						</tr>
					</thead>

					<tbody>
						<ui:repeat value="#{busca.imoveis}" var="cadaImovel">
							<tr>
								<td><h:commandLink
										action="#{imovel.mostrar(cadaImovel.id)}"
										value="#{cadaImovel.titulo}">
									</h:commandLink></td>
								<td><h:outputText value="#{cadaImovel.descricao}" /></td>
								<td><h:outputText value="#{cadaImovel.valor}" /></td>
								<td></td>
							</tr>
						</ui:repeat>
					</tbody>
				</table>
			</h:form>
		</div>
		<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
		<script
			src="//netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
	</f:view>
</body>
</html>
